package fr.idak.spring.tiles.web.security;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

public class CustomUserDetails extends User {
	private static final long serialVersionUID = -6184636402683886241L;

	private final String fullname;
	private final String email;

	public CustomUserDetails(String username, String password, boolean enabled,
							 boolean accountNonExpired, boolean credentialsNonExpired,
							 boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities,
							 String fullname, String email) {

		super(username, password, enabled, accountNonExpired, 
			  credentialsNonExpired, accountNonLocked, authorities);

		this.fullname = fullname;
		this.email = email;
	}

	public String getFullname() {
		return fullname;
	}

	public String getEmail() {
		return email;
	}
}
